﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TicketMGR.Hibernate.BusinessObjects
{
    class Channel : ObjectBase
    {
        #region Declarations

        private string _code = null;
        private string _channelMember = null;
        private double? _pricePerBlock = null;
        private int? _dayInWeek = null;
        private string _remark = null;
        

        private IList<ChannelHistory> _channelHistories = new List<ChannelHistory>();
        private IList<Transaction> _transactions = new List<Transaction>();

        #endregion
        #region Properties
        private Guid _id;
        public virtual Guid Id
        {
            get 
            {
                return _id;
            }
            set
            {
                OnIdChanging();
                _id = value;
                OnIdChanged();
            }
        }
        public virtual void OnIdChanging() { return; }
        public virtual void OnIdChanged() { return; }
        public virtual string Code
        {
            get { return _code; }
            set
            {
                OnCodeChanging();
                _code = value;
                OnCodeChanged();
            }
        }
        public virtual void OnCodeChanging() { return; }
        public virtual void OnCodeChanged() { return; }

        public virtual string ChannelMember
        {
            get { return _channelMember; }
            set
            {
                OnChannelMemberChanging();
                _channelMember = value;
                OnChannelMemberChanged();
            }
        }
        public virtual void OnChannelMemberChanging(){return;}
        public virtual void OnChannelMemberChanged() { return; }

        public virtual double? PricePerBlock
        {
            get { return _pricePerBlock; }
            set
            {
                OnPricePerBlockChanging();
                _pricePerBlock = value;
                OnPricePerBlockChanged();
            }
        }
        public virtual void OnPricePerBlockChanging() { return; }
        public virtual void OnPricePerBlockChanged() { return; }

        public virtual int? DayInWeek
        {
            get { return _dayInWeek; }
            set
            {
                OnDayInWeekChanging();
                _dayInWeek = value;
                OnDayInWeekChanged();
            }
        }
        public virtual void OnDayInWeekChanging() { return; }
        public virtual void OnDayInWeekChanged() { return; }

        public virtual string Remark
        {
            get { return _remark; }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        public virtual void OnRemarkChanging() { return; }
        public virtual void OnRemarkChanged() { return; }

        public virtual IList<ChannelHistory> ChannelHistories
        {
            get { return _channelHistories; }
            set
            {
                OnChannelHistoriesChanging();
                _channelHistories = value;
                OnChannelHistoriesChanged();
            }
        }
        public virtual void OnChannelHistoriesChanging() { return; }
        public virtual void OnChannelHistoriesChanged() { return; }

        public virtual IList<Transaction> Transactions
        {
            get { return _transactions; }
            set
            {
                OnTransactionsChanging();
                _transactions = value;
                OnTransactionsChanged();
            }
        }
        public virtual void OnTransactionsChanging() { return; }
        public virtual void OnTransactionsChanged() { return; }

        #endregion
    }
}
